\(\int x^3 (a+b \log (c x^n))^3 \, dx\) [57]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 77 \[ \int x^3 \left (a+b \log \left (c x^n\right )\right )^3 \, dx=-\frac {3}{128} b^3 n^3 x^4+\frac {3}{32} b^2 n^2 x^4 \left (a+b \log \left (c x^n\right )\right )-\frac {3}{16} b n x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^3 \]

[Out]

-3/128*b^3*n^3*x^4+3/32*b^2*n^2*x^4*(a+b*ln(c*x^n))-3/16*b*n*x^4*(a+b*ln(c*x^n))^2+1/4*x^4*(a+b*ln(c*x^n))^3

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2342, 2341} \[ \int x^3 \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {3}{32} b^2 n^2 x^4 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^3-\frac {3}{16} b n x^4 \left (a+b \log \left (c x^n\right )\right )^2-\frac {3}{128} b^3 n^3 x^4 \]

[In]

Int[x^3*(a + b*Log[c*x^n])^3,x]

[Out]

(-3*b^3*n^3*x^4)/128 + (3*b^2*n^2*x^4*(a + b*Log[c*x^n]))/32 - (3*b*n*x^4*(a + b*Log[c*x^n])^2)/16 + (x^4*(a +
 b*Log[c*x^n])^3)/4

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^3-\frac {1}{4} (3 b n) \int x^3 \left (a+b \log \left (c x^n\right )\right )^2 \, dx \\ & = -\frac {3}{16} b n x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^3+\frac {1}{8} \left (3 b^2 n^2\right ) \int x^3 \left (a+b \log \left (c x^n\right )\right ) \, dx \\ & = -\frac {3}{128} b^3 n^3 x^4+\frac {3}{32} b^2 n^2 x^4 \left (a+b \log \left (c x^n\right )\right )-\frac {3}{16} b n x^4 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^3 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.86 \[ \int x^3 \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {1}{4} \left (x^4 \left (a+b \log \left (c x^n\right )\right )^3-\frac {3}{32} b n x^4 \left (b^2 n^2-4 b n \left (a+b \log \left (c x^n\right )\right )+8 \left (a+b \log \left (c x^n\right )\right )^2\right )\right ) \]

[In]

Integrate[x^3*(a + b*Log[c*x^n])^3,x]

[Out]

(x^4*(a + b*Log[c*x^n])^3 - (3*b*n*x^4*(b^2*n^2 - 4*b*n*(a + b*Log[c*x^n]) + 8*(a + b*Log[c*x^n])^2))/32)/4

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(140\) vs. \(2(69)=138\).

Time = 0.40 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.83

method result size
parallelrisch \(\frac {x^{4} \ln \left (c \,x^{n}\right )^{3} b^{3}}{4}-\frac {3 \ln \left (c \,x^{n}\right )^{2} x^{4} b^{3} n}{16}+\frac {3 \ln \left (c \,x^{n}\right ) x^{4} b^{3} n^{2}}{32}-\frac {3 b^{3} n^{3} x^{4}}{128}+\frac {3 \ln \left (c \,x^{n}\right )^{2} x^{4} a \,b^{2}}{4}-\frac {3 \ln \left (c \,x^{n}\right ) x^{4} a \,b^{2} n}{8}+\frac {3 a \,b^{2} n^{2} x^{4}}{32}+\frac {3 \ln \left (c \,x^{n}\right ) x^{4} a^{2} b}{4}-\frac {3 a^{2} b n \,x^{4}}{16}+\frac {a^{3} x^{4}}{4}\) \(141\)
risch \(\text {Expression too large to display}\) \(2649\)

[In]

int(x^3*(a+b*ln(c*x^n))^3,x,method=_RETURNVERBOSE)

[Out]

1/4*x^4*ln(c*x^n)^3*b^3-3/16*ln(c*x^n)^2*x^4*b^3*n+3/32*ln(c*x^n)*x^4*b^3*n^2-3/128*b^3*n^3*x^4+3/4*ln(c*x^n)^
2*x^4*a*b^2-3/8*ln(c*x^n)*x^4*a*b^2*n+3/32*a*b^2*n^2*x^4+3/4*ln(c*x^n)*x^4*a^2*b-3/16*a^2*b*n*x^4+1/4*a^3*x^4

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 222 vs. \(2 (69) = 138\).

Time = 0.31 (sec) , antiderivative size = 222, normalized size of antiderivative = 2.88 \[ \int x^3 \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {1}{4} \, b^{3} n^{3} x^{4} \log \left (x\right )^{3} + \frac {1}{4} \, b^{3} x^{4} \log \left (c\right )^{3} - \frac {3}{16} \, {\left (b^{3} n - 4 \, a b^{2}\right )} x^{4} \log \left (c\right )^{2} + \frac {3}{32} \, {\left (b^{3} n^{2} - 4 \, a b^{2} n + 8 \, a^{2} b\right )} x^{4} \log \left (c\right ) - \frac {1}{128} \, {\left (3 \, b^{3} n^{3} - 12 \, a b^{2} n^{2} + 24 \, a^{2} b n - 32 \, a^{3}\right )} x^{4} + \frac {3}{16} \, {\left (4 \, b^{3} n^{2} x^{4} \log \left (c\right ) - {\left (b^{3} n^{3} - 4 \, a b^{2} n^{2}\right )} x^{4}\right )} \log \left (x\right )^{2} + \frac {3}{32} \, {\left (8 \, b^{3} n x^{4} \log \left (c\right )^{2} - 4 \, {\left (b^{3} n^{2} - 4 \, a b^{2} n\right )} x^{4} \log \left (c\right ) + {\left (b^{3} n^{3} - 4 \, a b^{2} n^{2} + 8 \, a^{2} b n\right )} x^{4}\right )} \log \left (x\right ) \]

[In]

integrate(x^3*(a+b*log(c*x^n))^3,x, algorithm="fricas")

[Out]

1/4*b^3*n^3*x^4*log(x)^3 + 1/4*b^3*x^4*log(c)^3 - 3/16*(b^3*n - 4*a*b^2)*x^4*log(c)^2 + 3/32*(b^3*n^2 - 4*a*b^
2*n + 8*a^2*b)*x^4*log(c) - 1/128*(3*b^3*n^3 - 12*a*b^2*n^2 + 24*a^2*b*n - 32*a^3)*x^4 + 3/16*(4*b^3*n^2*x^4*l
og(c) - (b^3*n^3 - 4*a*b^2*n^2)*x^4)*log(x)^2 + 3/32*(8*b^3*n*x^4*log(c)^2 - 4*(b^3*n^2 - 4*a*b^2*n)*x^4*log(c
) + (b^3*n^3 - 4*a*b^2*n^2 + 8*a^2*b*n)*x^4)*log(x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 167 vs. \(2 (75) = 150\).

Time = 0.45 (sec) , antiderivative size = 167, normalized size of antiderivative = 2.17 \[ \int x^3 \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {a^{3} x^{4}}{4} - \frac {3 a^{2} b n x^{4}}{16} + \frac {3 a^{2} b x^{4} \log {\left (c x^{n} \right )}}{4} + \frac {3 a b^{2} n^{2} x^{4}}{32} - \frac {3 a b^{2} n x^{4} \log {\left (c x^{n} \right )}}{8} + \frac {3 a b^{2} x^{4} \log {\left (c x^{n} \right )}^{2}}{4} - \frac {3 b^{3} n^{3} x^{4}}{128} + \frac {3 b^{3} n^{2} x^{4} \log {\left (c x^{n} \right )}}{32} - \frac {3 b^{3} n x^{4} \log {\left (c x^{n} \right )}^{2}}{16} + \frac {b^{3} x^{4} \log {\left (c x^{n} \right )}^{3}}{4} \]

[In]

integrate(x**3*(a+b*ln(c*x**n))**3,x)

[Out]

a**3*x**4/4 - 3*a**2*b*n*x**4/16 + 3*a**2*b*x**4*log(c*x**n)/4 + 3*a*b**2*n**2*x**4/32 - 3*a*b**2*n*x**4*log(c
*x**n)/8 + 3*a*b**2*x**4*log(c*x**n)**2/4 - 3*b**3*n**3*x**4/128 + 3*b**3*n**2*x**4*log(c*x**n)/32 - 3*b**3*n*
x**4*log(c*x**n)**2/16 + b**3*x**4*log(c*x**n)**3/4

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.75 \[ \int x^3 \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {1}{4} \, b^{3} x^{4} \log \left (c x^{n}\right )^{3} + \frac {3}{4} \, a b^{2} x^{4} \log \left (c x^{n}\right )^{2} - \frac {3}{16} \, a^{2} b n x^{4} + \frac {3}{4} \, a^{2} b x^{4} \log \left (c x^{n}\right ) + \frac {1}{4} \, a^{3} x^{4} + \frac {3}{32} \, {\left (n^{2} x^{4} - 4 \, n x^{4} \log \left (c x^{n}\right )\right )} a b^{2} - \frac {3}{128} \, {\left (8 \, n x^{4} \log \left (c x^{n}\right )^{2} + {\left (n^{2} x^{4} - 4 \, n x^{4} \log \left (c x^{n}\right )\right )} n\right )} b^{3} \]

[In]

integrate(x^3*(a+b*log(c*x^n))^3,x, algorithm="maxima")

[Out]

1/4*b^3*x^4*log(c*x^n)^3 + 3/4*a*b^2*x^4*log(c*x^n)^2 - 3/16*a^2*b*n*x^4 + 3/4*a^2*b*x^4*log(c*x^n) + 1/4*a^3*
x^4 + 3/32*(n^2*x^4 - 4*n*x^4*log(c*x^n))*a*b^2 - 3/128*(8*n*x^4*log(c*x^n)^2 + (n^2*x^4 - 4*n*x^4*log(c*x^n))
*n)*b^3

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 262 vs. \(2 (69) = 138\).

Time = 0.30 (sec) , antiderivative size = 262, normalized size of antiderivative = 3.40 \[ \int x^3 \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {1}{4} \, b^{3} n^{3} x^{4} \log \left (x\right )^{3} - \frac {3}{16} \, b^{3} n^{3} x^{4} \log \left (x\right )^{2} + \frac {3}{4} \, b^{3} n^{2} x^{4} \log \left (c\right ) \log \left (x\right )^{2} + \frac {3}{32} \, b^{3} n^{3} x^{4} \log \left (x\right ) - \frac {3}{8} \, b^{3} n^{2} x^{4} \log \left (c\right ) \log \left (x\right ) + \frac {3}{4} \, b^{3} n x^{4} \log \left (c\right )^{2} \log \left (x\right ) + \frac {3}{4} \, a b^{2} n^{2} x^{4} \log \left (x\right )^{2} - \frac {3}{128} \, b^{3} n^{3} x^{4} + \frac {3}{32} \, b^{3} n^{2} x^{4} \log \left (c\right ) - \frac {3}{16} \, b^{3} n x^{4} \log \left (c\right )^{2} + \frac {1}{4} \, b^{3} x^{4} \log \left (c\right )^{3} - \frac {3}{8} \, a b^{2} n^{2} x^{4} \log \left (x\right ) + \frac {3}{2} \, a b^{2} n x^{4} \log \left (c\right ) \log \left (x\right ) + \frac {3}{32} \, a b^{2} n^{2} x^{4} - \frac {3}{8} \, a b^{2} n x^{4} \log \left (c\right ) + \frac {3}{4} \, a b^{2} x^{4} \log \left (c\right )^{2} + \frac {3}{4} \, a^{2} b n x^{4} \log \left (x\right ) - \frac {3}{16} \, a^{2} b n x^{4} + \frac {3}{4} \, a^{2} b x^{4} \log \left (c\right ) + \frac {1}{4} \, a^{3} x^{4} \]

[In]

integrate(x^3*(a+b*log(c*x^n))^3,x, algorithm="giac")

[Out]

1/4*b^3*n^3*x^4*log(x)^3 - 3/16*b^3*n^3*x^4*log(x)^2 + 3/4*b^3*n^2*x^4*log(c)*log(x)^2 + 3/32*b^3*n^3*x^4*log(
x) - 3/8*b^3*n^2*x^4*log(c)*log(x) + 3/4*b^3*n*x^4*log(c)^2*log(x) + 3/4*a*b^2*n^2*x^4*log(x)^2 - 3/128*b^3*n^
3*x^4 + 3/32*b^3*n^2*x^4*log(c) - 3/16*b^3*n*x^4*log(c)^2 + 1/4*b^3*x^4*log(c)^3 - 3/8*a*b^2*n^2*x^4*log(x) +
3/2*a*b^2*n*x^4*log(c)*log(x) + 3/32*a*b^2*n^2*x^4 - 3/8*a*b^2*n*x^4*log(c) + 3/4*a*b^2*x^4*log(c)^2 + 3/4*a^2
*b*n*x^4*log(x) - 3/16*a^2*b*n*x^4 + 3/4*a^2*b*x^4*log(c) + 1/4*a^3*x^4

Mupad [B] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.43 \[ \int x^3 \left (a+b \log \left (c x^n\right )\right )^3 \, dx=x^4\,\left (\frac {a^3}{4}-\frac {3\,a^2\,b\,n}{16}+\frac {3\,a\,b^2\,n^2}{32}-\frac {3\,b^3\,n^3}{128}\right )+\frac {x^4\,\ln \left (c\,x^n\right )\,\left (6\,a^2\,b-3\,a\,b^2\,n+\frac {3\,b^3\,n^2}{4}\right )}{8}+\frac {x^4\,{\ln \left (c\,x^n\right )}^2\,\left (3\,a\,b^2-\frac {3\,b^3\,n}{4}\right )}{4}+\frac {b^3\,x^4\,{\ln \left (c\,x^n\right )}^3}{4} \]

[In]

int(x^3*(a + b*log(c*x^n))^3,x)

[Out]

x^4*(a^3/4 - (3*b^3*n^3)/128 + (3*a*b^2*n^2)/32 - (3*a^2*b*n)/16) + (x^4*log(c*x^n)*(6*a^2*b + (3*b^3*n^2)/4 -
 3*a*b^2*n))/8 + (x^4*log(c*x^n)^2*(3*a*b^2 - (3*b^3*n)/4))/4 + (b^3*x^4*log(c*x^n)^3)/4